{include file="header.html"}
<script type="text/javascript">
    function islock(obj,uid)
    {
        $.get('{php echo site_url("admin/manager/islock")}',{uid:uid},function(data){
            if(data == 'N')
            {
                $(obj).html('<img src="style/images/error.png">');
            }
            else{
                $(obj).html('<img src="style/images/right.png">');
            }
            
        });
    }
</script>
<div id="rightTop">
  <p>{$lang.manager_center}</p>
  <ul class="subnav">
    <li><span>{$lang.manager}</span></li>
    <li><a class="btn1" href="{php echo site_url('admin/manager/add')}">{$lang.add}</a></li>
  </ul>
</div>

<div class="mrightTop">
  <div class="pageLinks">{$page_html}</div>
</div>
<div class="tdare">
  <table width="100%" cellspacing="0" class="dataTable">
    <!--{if $lists}-->
    <tr class="tatr1">
      <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
      <td>{$lang.username} | {$lang.real_name}</td>
      <td><span ectype="order_by" fieldname="reg_time">{$lang.logintimes}</span></td>
      <td><span ectype="order_by" fieldname="last_login">{$lang.last_login}</span></td>
      <td><span ectype="order_by" fieldname="logins">{$lang.lastip}</span></td>
      <td style=" text-align: center;"><span ectype="order_by" fieldname="logins">{$lang.status}</span></td>
      <td>{$lang.role}</td>
      <td class="handler">{$lang.handler}</td>
    </tr>
    <!--{/if}-->
    <!--{foreach from=$lists item=user}-->
    <tr class="tatr2">
      <td class="firstCell">{if $user.uid neq 1}<input type="checkbox" class="checkitem" value="{$user.uid}" />{/if}</td>
      <td>{$user.username|escape} | {$user.realname|escape}</td>
      <td>{$user.login_times}</td>
      <td><!--{if $user.last_login_time}-->{$user.last_login_time|date:Y-m-d H:i:s}<!--{/if}--></td>
      <td>{$user.last_login_ip}</td>
      <td style=" text-align: center;">
          <a href="javascript:;" onclick="islock(this,'{$user.uid}')">
          {if $user.islock eq 'N'}
          <img src="style/images/right.png">
          {else}
          <img src="style/images/error.png">
          {/if}
          </a>
      </td>
      <td>{$lang.role}</td>
      <td class="handler">
      <span style="width: 100px">
      <a href="{php echo site_url('admin/manager/edit')}?uid={$user.uid}">{$lang.edit}</a> {if $user.uid neq 1}| <a href="javascript:drop_confirm('{$lang.drop_confirm}', '{php echo site_url('admin/manager/drop')}?uid={$user.uid}');">{$lang.drop}</a>{/if}
      </span>
      </td>
    </tr>
    <!--{foreachelse}-->
    <tr class="no_data">
      <td colspan="10">{$lang.no_data}</td>
    </tr>
    <!--{/foreach}-->
  </table>
  <!--{if $lists}-->
  <div id="dataFuncs">
    <div id="batchAction" class="left paddingT15"> &nbsp;&nbsp;
      <input class="formbtn batchButton" type="button" value="{$lang.drop}" name="uid" uri="{php echo site_url('admin/manager/drop')}" presubmit="confirm('{$lang.drop_confirm}');" />
    </div>
    <div class="pageLinks">{$page_html}</div>
    <div class="clear"></div>
  </div>
  <!--{/if}-->
</div>
{include file="footer.html"}